package com.chengyu.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.chengyu.core.entity.SceneRideCodeData;
import com.chengyu.core.entity.TblMemberEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 乘车码推送数据表 Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2023-05-26
 */

@Mapper
public interface SceneRideCodeDataMapper extends BaseMapper<SceneRideCodeData> {


    List<String> getTodayDate();


    List<String> getEffectiveDate(@Param("phone") String phone, @Param("typeCode") String typeCode);

    boolean updataExpire(@Param("phone") String phone, @Param("effectiveTime") String effectiveTime,@Param("typeCode") String typeCode);


    Integer getExistingData(@Param("typeCode") String typeCode);


    BigDecimal getTodayCarbonNumToalByPhoneDate(@Param("phone") String phone);

    Integer getTodayCountByPhoneDate(@Param("phone") String phone);


    Long updateClaimPointsByPhone(@Param("phone") String phone);

    List<SceneRideCodeData> selectListByPhone(SceneRideCodeData sceneRideCodeData);

    TblMemberEntity selectUserByPhone(String phone);
}
